#ifndef _MODULE_ACTIONINORDER_
#define _MODULE_ACTIONINORDER_
#ifdef __cplusplus
 extern "C" {
#endif
#include "stdint.h"
#include "RTL.h"

#ifdef _MODULE_ACTIONINORDER_GLOBALS
#define _MODULE_ACTIONINORDER_EXT
#else
#define _MODULE_ACTIONINORDER_EXT   extern
#endif

#define NodeGetTime os_time_get
typedef struct
{
	int32_t Timestamp;
	int32_t count;
	void* NodeOperate;
	int32_t arg;
}NodeTypeDef;

#define DefaultCount 16
typedef struct
{
	int32_t total;
	uint32_t StartTimestamp;
	NodeTypeDef Node[DefaultCount];
}NodeHandleTypeDef;

_MODULE_ACTIONINORDER_EXT NodeHandleTypeDef NodeAction1,NodeAction2,NodeAction3,NodeAction4;

_MODULE_ACTIONINORDER_EXT void NodeExec(NodeHandleTypeDef *hNode);
_MODULE_ACTIONINORDER_EXT void NodeDeInit(NodeHandleTypeDef *hNode);
_MODULE_ACTIONINORDER_EXT void NodeAdd(NodeHandleTypeDef *hNode,int32_t Timestamp,int32_t count,void *NodeOperate,int32_t arg);
_MODULE_ACTIONINORDER_EXT void NodeStart(NodeHandleTypeDef *hNode);
#ifdef __cplusplus
}
#endif
#endif
